{extend name='common@layout/base' /}
{block name='breadcrumb'}
<div class="nch-breadcrumb-layout">
    <div class="nch-breadcrumb wrapper">
        <i class="icon-home"></i>
        <span><a href="/">首页</a></span><span class="arrow">></span>
        <span><a href="{:url('member/index/index')}">我的企业</a></span><span class="arrow">></span>
        <span>我的消息</span>
    </div>
</div>
{/block}
{block name='content'}
<div class="ncm-container">
    {include file='common@layout/member_left' /}
    <div class="right-layout">

<div class="wrap">
  <div class="tabmenu">
    <ul class="tab">
      <?php if(is_array($member_menu) and !empty($member_menu)) {
	foreach ($member_menu as $key => $val) {
		$classname = 'normal';
		if($val['menu_key'] == $menu_key) {
			$classname = 'active';
		}
		if ($val['menu_key'] == 'message'){
			echo '<li class="'.$classname.'"><a href="'.$val['menu_url'].'">'.$val['menu_name'].'(<span style="color: red;">'.$newcommon.'</span>)</a></li>';
		}elseif ($val['menu_key'] == 'system'){
			echo '<li class="'.$classname.'"><a href="'.$val['menu_url'].'">'.$val['menu_name'].'(<span style="color: red;">'.$newsystem.'</span>)</a></li>';
		}elseif ($val['menu_key'] == 'close'){
			echo '<li class="'.$classname.'"><a href="'.$val['menu_url'].'">'.$val['menu_name'].'(<span style="color: red;">'.$newpersonal.'</span>)</a></li>';
		}else{
			echo '<li class="'.$classname.'"><a href="'.$val['menu_url'].'">'.$val['menu_name'].'</a></li>';
		}
	}
}?>
    </ul>
  </div>
  <div class="ncm-default-form">
    <?php if(!empty($message_list)) { ?>
    <?php foreach ($message_list as $k=>$v){?>
    <dl>
      <dt>
        <?php if ($drop_type == 'msg_seller'){?>
        <?php echo $v['from_member_name']; ?> <?php echo '说'; }elseif ($drop_type == 'msg_system') {
        	echo $v['from_member_name'];
        	} else {
        		echo $v['from_member_name'].'说：';} ?></dt>
      <dd>
        <p><?php echo nl2br($v['message_body']); ?></p>
        <p class="hint">(<?php echo date("Y-m-d H:i",$v['message_time']); ?>)</p>
      </dd>
    </dl>
    <?php } ?>
    <?php } ?>
    <?php if($_GET['drop_type'] == 'msg_list' && $isallowsend){?>
    <form id="replyform" method="post" action="index.php?act=member_message&op=savereply">
      <input type="hidden" name="form_submit" value="ok" />
      <input type="hidden" name="message_id" value="<?php echo $message_id; ?>" />
      <dl class="bottom">
        <dt>回复：</dt>
        <dd>
          <p>
            <textarea name="msg_content" rows="3" class="textarea w500"></textarea>
          </p>
          <p> </p>
        </dd>
      </dl>
      <dl class="bottom">
      <dt>&nbsp;</dt>
      <dd>
        <label class="submit-border">
          <input type="submit" class="submit" value="提交" />
        </label></dd>
      </dl>
    </form>
    <script type="text/javascript">
    $(function(){
    	  $('#replyform').validate({
    	        errorPlacement: function(error, element){
    	            $(element).parent().next('p').html(error);
    	        },
    	        rules : {
    	        	msg_content : {
    	                required   : true
    	            }
    	        },
    	        messages : {
    	            msg_content : {
    	                required   : '回复内容不能为空.'
    	            }
    	        }
    	    });
    });
    </script>
    <?php }?>
  </div>
</div>

    </div>
    <div class="clear"></div>
</div>
{/block}